package com.yanqu.road.entity.activity.musicroomrank;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_s_activity_musicroom_rank", desc = "妙音坊冲榜 演出榜配置")
public class MusicRoomRankConfigRankData{
    @FieldTypeAnnotation(desc = "活动id", select = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "id")
    private int id;
    @FieldTypeAnnotation(desc = "称号名字")
    private String name;
    @FieldTypeAnnotation(desc = "称号描述")
    private String desc;
    @FieldTypeAnnotation(desc = "档位最低排名")
    private int rank;
    @FieldTypeAnnotation(desc = "获得冲榜积分")
    private int score;
    @FieldTypeAnnotation(desc = "奖励")
    private String reward;
    @FieldTypeAnnotation(desc = "图标")
    private String icon;

    private List<List<Property>> rewardList=  new ArrayList<>();

    public MusicRoomRankConfigRankData() {
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        this.reward = reward;
        if (!StringUtils.isNullOrEmpty(reward) && !reward.equals("0")) {
            this.rewardList = PropertyHelper.parseNewStringToPropertyList(reward);
        }
    }

    public List<List<Property>> getRewardList() {
        return rewardList;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getIcon() {
        return icon;
    }
}
